package com.yunke.dto.service;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.*;

/**
 * 预订服务请求DTO
 * 
 * @author yunke
 * @since 1.0.0
 */
@Data
@Schema(description = "预订服务请求")
public class YunkeServiceBookDto {

    /**
     * 服务ID
     */
    @NotNull(message = "服务ID不能为空")
    @Schema(description = "服务ID", example = "1")
    private Long serviceId;

    /**
     * 订单类型：1-立即预订 2-预约服务
     */
    @NotNull(message = "订单类型不能为空")
    @Min(value = 1, message = "订单类型值不正确")
    @Max(value = 2, message = "订单类型值不正确")
    @Schema(description = "订单类型：1-立即预订 2-预约服务", example = "1")
    private Integer orderType;

    /**
     * 服务数量
     */
    @NotNull(message = "服务数量不能为空")
    @Min(value = 1, message = "服务数量必须大于0")
    @Schema(description = "服务数量", example = "1")
    private Integer quantity;

    /**
     * 服务时间（预约时间，时间戳）
     */
    @Schema(description = "服务时间（预约时间）", example = "1704067200000")
    private Long serviceTime;

    /**
     * 服务地址
     */
    @Schema(description = "服务地址", example = "北京市朝阳区三里屯SOHO")
    private String serviceAddress;

    /**
     * 联系人姓名
     */
    @NotBlank(message = "联系人姓名不能为空")
    @Size(min = 2, max = 20, message = "联系人姓名长度为2-20个字符")
    @Schema(description = "联系人姓名", example = "张三")
    private String contactName;

    /**
     * 联系人电话
     */
    @NotBlank(message = "联系人电话不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "联系人电话格式不正确")
    @Schema(description = "联系人电话", example = "13800138000")
    private String contactPhone;

    /**
     * 特殊要求
     */
    @Size(max = 500, message = "特殊要求不能超过500个字符")
    @Schema(description = "特殊要求", example = "请提前联系确认时间")
    private String requirements;

    /**
     * 订单备注
     */
    @Size(max = 200, message = "订单备注不能超过200个字符")
    @Schema(description = "订单备注", example = "紧急项目，请尽快处理")
    private String remark;
} 